package vip.mtdp.asset.api;

import vip.mtdp.asset.api.dto.AccountDTO;
import vip.mtdp.asset.api.request.OpenAccountRequest;
import vip.mtdp.asset.api.request.QueryAccountBalanceRequest;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Description 账户服务，提供账户管理，余额管理
 *
 * @Author Evans.wang
 * @since 2023/10/28 20:03
 **/
public interface AccountService {

    /**
     * 开户
     * @param request
     */
    public void open(OpenAccountRequest request);


    /**
     * 账户信息查询(包括余额)
     * @param vaultId
     * @param no
     * @return
     */
    public AccountDTO queryByNo(Long vaultId, String chain, String no);


    /**
     * 账户余额查询
     * @param request
     * @return
     */
    public List<AccountDTO.BalanceDTO> queryBalance(QueryAccountBalanceRequest request);


    /**
     * 分页查询账户余额
     * @param request
     * @return
     */
    public List<AccountDTO.BalanceDTO> queryBalanceByPage(QueryAccountBalanceRequest request);

    /**
     * 冻结
     * @param accountId
     * @param coin
     * @param amount
     * @return
     */
    public boolean frozenBalance(Long accountId, String coin, BigDecimal amount);

    /**
     * 解冻
     * @param accountId
     * @param coin
     * @param amount
     * @return
     */
    public boolean unFrozenBalance(Long accountId, String coin, BigDecimal amount);


    //nft 更新账户余额



}
